1. Field of the Invention
This invention relates to an apparatus for solving logic and, more particularly, to a logic controller apparatus for solving programmable controller ladder logic.
2. Background Information
Programmable logic controllers (PLC's) are well-known in the art. Programmable logic controllers are utilized to solve ladder logic which is represented by a power rail, a plurality of inputs or functional devices or contacts, a plurality of outputs or results devices or coils, and a neutral rail. The ladder logic includes a plurality of individual ladder diagrams, segments or rungs.
Each ladder diagram includes one or more dual-ported functional devices, each having a left port and a right port, and one or more dual-ported results devices. The functional devices and results devices are interconnected in a series and/or parallel fashion between the power and neutral rails. The left port of at least one of the functional devices is connected to the power rail, the right port of the results devices is connected to the neutral rail, and the right port of at least one of the functional devices is connected to the left port of the results devices. In this manner, the ladder logic emulates hardwired relay logic in which relay contacts and relay coils are hardwire-connected between the rails of a power source.
In the ladder logic, the contacts are typically organized in a plurality of rows and columns. For example, a plurality of contacts may be connected in series in one of the rows and a plurality of contacts may be connected in parallel in one of the columns. The open or closed state of the contacts in combination with the ladder logic of the ladder segment defines whether power flows from the power rail, through one or more of the contacts, and through the results device to the neutral rail, thereby energizing the results device.
It is known to solve ladder logic on a column by column basis. For example, in a ladder segment having plural columns and plural rows, the power flow through the first column is determined for each of the rows on the basis of the presence or absence of a contact in each of the rows, the closed or open state of the contacts, and the presence or absence of a parallel connection between adjacent rows. After power flow through the first column is determined, the power flow through the other columns is sequentially determined for the second column through the last column. Finally, the energized or non-energized state of the results devices is determined on the basis of the power flowing thereto out of the last column of the contacts.
It is also known to solve ladder logic when power flow is only positive or forward (e.g., generally from the left port to the right port of a closed contact) without allowing for solution when power must flow in the negative or reverse direction (e.g., generally from the right port to the left port of a closed contact). In this regard, it is known to solve ladder logic in a PLC for forward power flow but not reverse power flow.
Although these known methods provide the solution of power flow from the power rail through the contacts to the results device, there is room for improvement.